let arr = ["username", "useremail", "qqNumber", "phoneNumber"]
console.log("请输入" + arr[0] + ":");
let msg = {};
let index = 0;
//Process的stdin对象监听data事件
//data不会退出 一直监听用户输入
process.stdin.on("data", (data) => {
    // console.log(data.toString());
    let info = data.toString();
    msg[arr[index++]] = info;
    if (index == arr.length) {
        console.log(msg);
        //进程退出
        process.exit();
    }
    console.log("请输入" + arr[index] + ":");
})
